#include "sqlite.hpp"
#include <cassert>
int main()
{
    // 1.创建、打开数据库文件
    SqliteHelper sql_helper("./test.db");
    assert(sql_helper.open());
    // 2.创建表
    const char *creat_table_sql = "create table if not exists student(sn int primary key, name varchar(32), age int);";
    assert(sql_helper.exec(creat_table_sql, nullptr, nullptr));
    // 3.数据的增删查改
    // const char *insert_sql = "insert into student values(1, '陈志鸿', 18), (2, '咖啡哥', 19), (3, '钟', 21);";
    // assert(sql_helper.exec(insert_sql, nullptr, nullptr));

    // const char *update_sql = "update student set age=21 where sn=1;";
    // assert(sql_helper.exec(update_sql, nullptr, nullptr));
    
    // const char *detele_sql = "detele from where sn=1;";
    // assert(sql_helper.exec(detele_sql, nullptr, nullptr));

    // const char *select_sql = "select name from student";
    // assert(sql_helper.exec(select_sql, select_call_back, nullptr));

    // 4.关闭数据库
    sql_helper.close();
}